package Fileinputstream;

import java.io.FileInputStream;
import java.io.IOException;

public class fileinputstreamTest03 {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("F:\\javacode\\temp");
            int count = fis.available();     //返回输入文件的字节数
            byte[] bytes = new byte[count];
            fis.read(bytes);
            System.out.print(new String(bytes));


        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if(fis!=null){
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
